﻿using System;

class IntDoubleOrString
{
    static void Main()
    {
        //Exercise 8.
        //Write a program that, depending on the user's choice inputs int, double or string variable. 
        //If the variable is integer or double, increases it with 1. If the variable is string, appends "*" at its end. 
        //The program must show the value of that variable as a console output. Use switch statement.

        Console.Write("Please enter 0 for integer, 1 for double or 2 for string:  ");
        int userInput = int.Parse(Console.ReadLine());

        switch (userInput)
        {
            case 0:
                Console.Write("Enter a number:  ");
                int number = int.Parse(Console.ReadLine());
                Console.WriteLine(number + 1);
                break;
            case 1:
                Console.Write("Enter a number:  ");
                double numberDouble = double.Parse(Console.ReadLine());
                Console.WriteLine(numberDouble + 1);
                break;
            case 2:
                Console.Write("Enter string:  ");
                string text = Console.ReadLine();
                Console.WriteLine(text + "*");
                break;
            default:
                Console.WriteLine("Invalid entry!");
                break;
        }
        Console.WriteLine();
    }
}

